package router

import (
	"nonius/controller"

	"github.com/astaxie/beego"
)

func RegisterRouters() {
	beego.AutoRouter(&controller.UserController{})
	beego.AutoRouter(&controller.AuthController{})
	beego.AutoRouter(&controller.HomeController{})

	// link
	beego.Get("/:link([0-9a-zA-Z]{1,6})", controller.RedirectLongLink)
	beego.Get("/", controller.RedirectQuery)
	beego.AutoRouter(&controller.LinkController{})
}
